﻿using NewsPortal.Domain;
using System.Data.Entity.ModelConfiguration;

namespace NewsPortal.DataAccess.POCO.Config
{
    public class GridConfiguraiton: EntityTypeConfiguration<Grid>
    {
        public GridConfiguraiton()
        {
            this.HasKey(g => g.Id);

            this.HasMany(g => g.Rows).WithRequired(r => r.Grid).HasForeignKey(r => r.GridId);
        }
    }
}
